﻿@{
    ViewBag.Title = "Dashboard Annuel";
    Layout = "~/Views/Shared/_Layout_home.cshtml";
}

@section css{
    <link href="@Url.Content("~/Content/css/bootstrap-responsive.css")" rel="stylesheet">
    <link href="@Url.Content("~/Content/css/highchart.css")" rel="stylesheet">
    <link href="@Url.Content("~/Content/css/style_dash.css")" rel="stylesheet">
}
 
            <div class="span6" >
              <div id="container1" class="highchart"></div>
            </div> 

            <div class="span6" >   
              <div id="container2" class="highchart"></div>
            </div>  

            <div class="span6" >   
              <div id="container3" class="highchart"></div>
            </div> 

            <div class="span6" >   
              <div id="container4" class="highchart"></div>
            </div> 

          </div>
          </div><!--/span-->       

          <div class="span3">
            <h2>Analyses</h2>
              <div class="well sidebar-nav">
              <ul class="nav nav-list">
                <li class="nav-header">Dashboard</li>
                <li><a href="Dashboard">Dashboard Journalier</a></li>
                <li><a href="Dashboard_hebdo">Dashboard hebdomadaire</a></li>
                <li><a href="Dashboard_mens">Dashboard Mensuel</a></li>
                <li class="active"><a href="Dashboard_annu">Dashboard Annuel</a></li>
                <li class="nav-header">Rapports des Employées</li>
                <li><a href="Server">Dashboard Serveur</a></li>
                <li><a href="Cook">Dashboard Cuisinier</a></li>
              </ul>

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
@section script{
    <script src="@Url.Content("~/Content/js/highcharts.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/js/modules/exporting.js")" type="text/javascript"></script>
}
     <!-- Container 1 -->
    <script type="text/javascript">
        $(function () {
            var chart;
            $(document).ready(function () {
                chart = new Highcharts.Chart({
                    chart: {
                        renderTo: 'container1',
                        type: 'line',
                        marginRight: 130,
                        marginBottom: 25
                    },
                    title: {
                        text: 'Chiffre d\'affaire annuel par restaurant',
                        x: -20 //center
                    },
                    subtitle: {
                        text: 'Source: You Food',
                        x: -20
                    },
                    xAxis: {
                        categories: ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun',
                          'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec']
                    },
                    yAxis: {
                        title: {
                            text: 'Chiffre d\'affaire (en Euros)'
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        formatter: function () {
                            return '<b>' + this.series.name + '</b><br/>' +
                              this.x + ': ' + this.y + '°C';
                        }
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'top',
                        x: -10,
                        y: 100,
                        borderWidth: 0
                    },
                    series: [{
                        name: 'Tokyo',
                        data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
                    }, {
                        name: 'New York',
                        data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
                    }, {
                        name: 'Berlin',
                        data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
                    }, {
                        name: 'London',
                        data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
                    }]
                });
            });

        });
    </script>

    <!-- Container 2 -->
    <script type="text/javascript">
        $(function () {
            var chart;
            $(document).ready(function () {
                chart = new Highcharts.Chart({
                    chart: {
                        renderTo: 'container2',
                        type: 'line',
                        marginRight: 130,
                        marginBottom: 25
                    },
                    title: {
                        text: 'Nombres de commandes Annuel par restaurants',
                        x: -20 //center
                    },
                    subtitle: {
                        text: 'Source: You Food',
                        x: -20
                    },
                    xAxis: {
                        categories: ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun',
                          'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec']
                    },
                    yAxis: {
                        title: {
                            text: 'Unité'
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        formatter: function () {
                            return '<b>' + this.series.name + '</b><br/>' +
                              this.x + ': ' + this.y + '°C';
                        }
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'top',
                        x: -10,
                        y: 100,
                        borderWidth: 0
                    },
                    series: [{
                        name: 'Tokyo',
                        data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
                    }, {
                        name: 'New York',
                        data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
                    }, {
                        name: 'Berlin',
                        data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
                    }, {
                        name: 'London',
                        data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
                    }]
                });
            });

        });
    </script>

    <!-- Container 3 -->
  <script type="text/javascript">
      $(function () {
          var chart;
          $(document).ready(function () {
              chart = new Highcharts.Chart({
                  chart: {
                      renderTo: 'container3',
                      plotBackgroundColor: null,
                      plotBorderWidth: null,
                      plotShadow: false
                  },
                  title: {
                      text: 'Plats les plus commandés, Annuel'
                  },
                  tooltip: {
                      formatter: function () {
                          return '<b>' + this.point.name + '</b>: ' + this.percentage + ' %';
                      }
                  },
                  plotOptions: {
                      pie: {
                          allowPointSelect: true,
                          cursor: 'pointer',
                          dataLabels: {
                              enabled: true,
                              color: '#000000',
                              connectorColor: '#000000',
                              formatter: function () {
                                  return '<b>' + this.point.name + '</b>: ' + this.percentage + ' %';
                              }
                          }
                      }
                  },
                  series: [{
                      type: 'pie',
                      name: 'Plats préférés',
                      data: [
                          ['Pavé de Boeuf', 45.0],
                          ['Saule à l\'anglaise', 26.8],
                          {
                              name: 'Fois Gras',
                              y: 12.8,
                              sliced: true,
                              selected: true
                          },
                          ['Tomate Mozza', 8.5],
                          ['Pizza', 6.2],
                          ['Salade Ceasar', 0.7]
                      ]
                  }]
              });
          });

      });
    </script>

    <!-- Container 4 -->
    <script type="text/javascript">
        $(function () {
            var chart;
            $(document).ready(function () {
                chart = new Highcharts.Chart({
                    chart: {
                        renderTo: 'container4',
                        type: 'column'
                    },
                    title: {
                        text: 'Nombres de commandes Annuel par employées'
                    },
                    xAxis: {
                        categories: /*inséré les restaurants*/['Lyon', 'Paris', 'Marseille', 'Grenoble', 'Eybens']
                    },
                    yAxis: {
                        min: 0,
                        title: {
                            text: 'Ratio Nbres de commandes/Employées'
                        },
                        stackLabels: {
                            enabled: true,
                            style: {
                                fontWeight: 'bold',
                                color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                            }
                        }
                    },
                    legend: {
                        align: 'right',
                        x: -100,
                        verticalAlign: 'top',
                        y: 20,
                        floating: true,
                        backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
                        borderColor: '#CCC',
                        borderWidth: 1,
                        shadow: false
                    },
                    tooltip: {
                        formatter: function () {
                            return '<b>' + this.x + '</b><br/>' +
                              this.series.name + ': ' + this.y + '<br/>' +
                              'Total: ' + this.point.stackTotal;
                        }
                    },
                    plotOptions: {
                        column: {
                            stacking: 'normal',
                            dataLabels: {
                                enabled: true,
                                color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
                            }
                        }
                    },
                    series: [{

                        name: 'Employées',
                        data: [10, 25, 21, 12, 6]
                    }, {
                        name: 'Commandes',
                        data: [179, 450, 375, 125, 73]
                    }]
                });
            });

        });
    </script>